package com.audaque.springboot.foshanupload.web.datamongodbdemo.api;

import com.audaque.springboot.foshanupload.web.datamongodbmodeldemo.model.pojo.MusicDetail;
import com.audaque.springboot.foshanupload.web.datamongodbmodeldemo.model.qo.MusicQo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author zgb
 * @desc ...
 * @date 2023-07-23 02:18:29
 */
@Api(value = "音乐信息管理", description = "提供音乐的增删改查", tags = {"音乐信息管理"})
public interface MusicControllerApi {

    @ApiOperation("音乐信息添加")
    String add(MusicDetail musicDetail);

    @ApiOperation("音乐信息修改")
    void edit(MusicDetail musicDetail) throws Exception;

    @ApiOperation("音乐信息修改字段")
    void editField(String id,String name) throws Exception;

    @ApiOperation("音乐信息覆盖为json")
    void override2json(String id) throws Exception;

    @ApiOperation("音乐信息覆盖")
    void override(MusicDetail musicDetail) throws Exception;


    @ApiOperation("音乐信息查询")
    MusicDetail get(String id);


    @ApiOperation("音乐信息删除")
    void del(String id);

    @ApiOperation("按指定条件查询并且分页")
    Page<MusicDetail> page(int page, int size, MusicQo musicQo);

    @ApiOperation("嵌套查询")
    public MusicDetail dBRef(@PathVariable("bookId") String bookId);
}
